<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Cpanel Device Wicity</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/jquery.js"></script>
    <base href="<?php echo site_url()?>" />
    <link rel="stylesheet" href="<?php echo site_url()?>assets/plugins/jquery.alerts.css" />
    <script type="text/javascript" src="<?php echo site_url()?>assets/plugins/jquery.alerts.js"></script>
    <link rel="stylesheet" href="<?php echo site_url()?>assets/css/style.css">
    <link rel="stylesheet" href="<?php echo site_url()?>assets/css/loader-style.css">
    <link rel="stylesheet" href="<?php echo site_url()?>assets/css/bootstrap.css">

    <link rel="stylesheet" href="<?php echo site_url()?>assets/js/tree/jquery.treeview.css" />

    <link rel="stylesheet" href="<?php echo site_url()?>assets/js/tree/treetable/stylesheets/jquery.treetable.css" />
    <link rel="stylesheet" href="<?php echo site_url()?>assets/js/tree/treetable/stylesheets/jquery.treetable.theme.default.css" />

    <link href="<?php echo site_url()?>assets/js/tree/tabelizer/tabelizer.min.css" media="all" rel="stylesheet" type="text/css" />
    
    
</head>

<body>
    <!-- Preloader -->
    <div id="preloader">
        <div id="status">&nbsp;</div>
    </div>
    <!-- TOP NAVBAR -->
    <nav role="navigation" class="navbar navbar-static-top">
        <?php $this->load->view('temp/block/header');?>
    </nav>

    <!-- /END OF TOP NAVBAR -->

    <!-- SIDE MENU -->
    <div id="skin-select">
        <div id="logo">
            <h1>Wicity
            </h1>
        </div>

        <a id="toggle" style="display: none;">
            <span class="entypo-menu"></span>
        </a>
        <div class="skin-part">
            <div id="tree-wrap">
                <div class="side-bar">
                    <?php $this->load->view('temp/block/left');?>
                </div>
            </div>
        </div>
    </div>
    <!-- END OF SIDE MENU -->

    <!--  PAPER WRAP -->
    <div class="wrap-fluid" style="margin-top: -25px">
        <?php $this->load->view("temp/".($controller ? $controller : 'index')."/".($action ? $action : 'index'),'');?>
	</div>

        </div>
    </div>
    <!--  END OF PAPER WRAP -->
    <!-- MAIN EFFECT -->
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/preloader.js"></script>
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/bootstrap.js"></script>
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/app.js"></script>
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/load.js"></script>
    <script type="text/javascript" src="<?php echo site_url()?>assets/js/main.js"></script>
    <!-- /MAIN EFFECT -->
    <script src="<?php echo site_url()?>assets/js/tree/lib/jquery.cookie.js" type="text/javascript"></script>
    <script src="<?php echo site_url()?>assets/js/tree/jquery.treeview.js" type="text/javascript"></script>


    <script src="<?php echo site_url()?>assets/js/tree/tabelizer/jquery-ui-1.10.4.custom.min.js"></script>
    <script src="<?php echo site_url()?>assets/js/tree/tabelizer/jquery.tabelizer.js"></script>

    <script src="<?php echo site_url()?>assets/js/tree/treetable/vendor/jquery-ui.js"></script>
    <script src="<?php echo site_url()?>assets/js/tree/treetable/javascripts/src/jquery.treetable.js"></script>

    <script type="text/javascript">
    /*$(function() {
        $("#browser, #browser2").treeview({
            animated: "fast",
            collapsed: false,
            unique: true,
            persist: "cookie",
            toggle: function() {
                window.console && console.log("%o was toggled", this);
            }
        });
    });*/
    </script>

    <script>
    $("#example-basic").treetable({expandable:!0}),$("#example-basic-static").treetable(),$("#example-basic-expandable").treetable({expandable:!0}),$("#example-advanced").treetable({expandable:!0}),$("#example-advanced tbody").on("mousedown","tr",function(){$(".selected").not(this).removeClass("selected"),$(this).toggleClass("selected")}),$("#example-advanced .file, #example-advanced .folder").draggable({helper:"clone",opacity:.75,refreshPositions:!0,revert:"invalid",revertDuration:300,expandable:!0,scroll:!0}),$("#example-advanced .folder").each(function(){$(this).parents("#example-advanced tr").droppable({accept:".file, .folder",drop:function(e,a){var t=a.draggable.parents("tr");$("#example-advanced").treetable("move",t.data("ttId"),$(this).data("ttId"))},hoverClass:"accept",over:function(e,a){var t=a.draggable.parents("tr");this==t[0]||$(this).is(".expanded")||$("#example-advanced").treetable("expandNode",$(this).data("ttId"))}})});
    </script>
    <script>
        $(document).ready(function()
        {
            var checkpopup = 1;
            $('.address').keyup(function()
            {
                //checkpopup == 1;
                var txt = $(this).val();
                $(".show_msg").show();
               
                    console.log('checkpopup', checkpopup);
                    $("#box-map").attr('style', 'display: block');    
                
                checkpopup = 2;
                
                setTimeout(function()
                {
                    load();
                    setTimeout(function()
                    {
                        showAddress(txt);  
                    }, 1000);  
                }, 1000);
            });
        })
    </script>
    
    <script src="http://maps.google.com/maps?file=api&amp;v=3&amp;key=ABQIAAAAgrj58PbXr2YriiRDqbnL1RSqrCjdkglBijPNIIYrqkVvD1R4QxRl47Yh2D_0C1l5KXQJGrbkSDvXFA"
      type="text/javascript"></script>
    <script type="text/javascript">

	function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        var center = new GLatLng(48.89364,  	2.33739);
        map.setCenter(center, 15);
        geocoder = new GClientGeocoder();
        var marker = new GMarker(center, {draggable: true});  
        map.addOverlay(marker);
        document.getElementById("lat").value = center.lat().toFixed(5);
        document.getElementById("lng").value = center.lng().toFixed(5);

	  GEvent.addListener(marker, "dragend", function() {
       var point = marker.getPoint();
	      map.panTo(point);
       document.getElementById("lat").value = point.lat().toFixed(5);
       document.getElementById("lng").value = point.lng().toFixed(5);

        });


	 GEvent.addListener(map, "moveend", function() {
		  map.clearOverlays();
    var center = map.getCenter();
		  var marker = new GMarker(center, {draggable: true});
		  map.addOverlay(marker);
		  document.getElementById("lat").value = center.lat().toFixed(5);
	   document.getElementById("lng").value = center.lng().toFixed(5);


	 GEvent.addListener(marker, "dragend", function() {
      var point =marker.getPoint();
	     map.panTo(point);
      document.getElementById("lat").value = point.lat().toFixed(5);
	     document.getElementById("lng").value = point.lng().toFixed(5);

        });
 
        });

      }
    }

    function showAddress(address) {
	   var map = new GMap2(document.getElementById("map"));
       map.addControl(new GSmallMapControl());
       map.addControl(new GMapTypeControl());
       if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
            } else {
                    $(".show_msg").hide();                    
                    document.getElementById("lat").value = point.lat().toFixed(5);
                    document.getElementById("lng").value = point.lng().toFixed(5);
                    map.clearOverlays()
                    map.setCenter(point, 14);
                    var marker = new GMarker(point, {draggable: true});  
                    map.addOverlay(marker);
                    
                    GEvent.addListener(marker, "dragend", function() {
                        var pt = marker.getPoint();
                        map.panTo(pt);
                        document.getElementById("lat").value = pt.lat().toFixed(5);
                        document.getElementById("lng").value = pt.lng().toFixed(5);
                    });
                    GEvent.addListener(map, "moveend", function() {
                        map.clearOverlays();
                        var center = map.getCenter();
                        var marker = new GMarker(center, {draggable: true});
                        map.addOverlay(marker);
                        document.getElementById("lat").value = center.lat().toFixed(5);
                        document.getElementById("lng").value = center.lng().toFixed(5);
                        
                        GEvent.addListener(marker, "dragend", function() {
                            var pt = marker.getPoint();
                            map.panTo(pt);
                            document.getElementById("lat").value = pt.lat().toFixed(5);
                            document.getElementById("lng").value = pt.lng().toFixed(5);
                        });
                    
                    });
                }
            });
        }
    }
    </script>
    <script type="text/javascript" src="<?php echo site_url()?>assets/plugins/chosen.jquery.min.js"></script>
    <link rel="stylesheet" href="<?php echo site_url()?>assets/plugins/chosen.css"/>
    <script type="text/javascript">
    var config = {
      '.chosen-select'           : {width: "353px"}
    }
    for (var selector in config) {
      $(selector).chosen(config[selector]);
    }
    </script>

    <script type="text/javascript" src="<?php echo site_url()?>assets/js/custom.js"></script>
</body>

</html>
